//============================================================================
// Name        : ad2usb.h
// Author      : Casey Kelso
// Copyright   : Kineticsproject.com (c) 2011
// Description : Basic ad2usb control library
//============================================================================

#ifndef AD2USB_H_
#define AD2USB_H_
#define VERSION "0.04"

#include <list>

#define UNKNOWN 0
#define READY 1
#define ARMED_AWAY 2
#define ARMED_STAY 3
#define TRIGGERED 4
#define SIREN 5

using namespace std;

class SerialPort;
class AlarmStatus;

class ad2usb
{
public:
void Process(void);
const bool getStatus(AlarmStatus &status);
const int getStatus(void);

virtual ~ad2usb();
ad2usb();
const char* getVersion(){ return(VERSION);}
void openPort(const char* port);


private:
const int           BUFFER_SIZE;
unsigned char       *buffer;
int                 bufferSize;
SerialPort          *serialPort; // I had to make this a pointer to get the forward declaration to work with SWIG
list<AlarmStatus>   alarmStatusList;

};

#endif /* AD2USB_H_ */
